<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jeecms_sys/head.html"/> 
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"> </script>
<script src="${base}/jplayer/jquery.jplayer.min.js" type="text/javascript"></script>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('queryForm');
}
function optConfirm(obj){
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	obj.disabled = true;
	var f = document.getElementById('tableForm');;
	f.action="o_confirm.do?pageNo=${pageNo!}&orderCode=${orderCode!}&userName=${userName!}&shopId=${shopId!}&status=${status!}&type=${type!}&startTime=${startTime!}&endTime=${endTime!}&disAddId=${disAddId!}";
	f.submit();
}
function optShipped(obj){
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	obj.disabled = true;
	var f = document.getElementById('tableForm');;
	f.action="o_batch_shipped.do?pageNo=${pageNo!}&orderCode=${orderCode!}&userName=${userName!}&shopId=${shopId!}&status=${status!}&type=${type!}&startTime=${startTime!}&endTime=${endTime!}&disAddId=${disAddId!}";
	f.submit();
}
function optConsignee(obj){
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	obj.disabled = true;
	var f = document.getElementById('tableForm');;
	f.action="v_consignee.do?pageNo=${pageNo!}&orderCode=${orderCode!}&userName=${userName!}&shopId=${shopId!}&status=${status!}&type=${type!}&startTime=${startTime!}&endTime=${endTime!}&disAddId=${disAddId!}";
	f.submit();
}
function optDelete(obj) {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	obj.disabled = true;
	if(!confirm('确定取消订单吗？')) {
		return;
	}
	var f = document.getElementById('tableForm');;
	f.action="o_close.do?pageNo=${pageNo!}&orderCode=${orderCode!}&userName=${userName!}&shopId=${shopId!}&status=${status!}&type=${type!}&startTime=${startTime!}&endTime=${endTime!}&disAddId=${disAddId!}";
	f.submit();
}

function optPrint(obj) {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	//obj.disabled = true;
	var f = document.getElementById('tableForm');;
	f.action="o_print.do";
	f.target="_blank"
	f.submit();
}

var count = 0;

var jp;
function playMusic(){
	$.post("alert.do",{},function(json){
		if(json == "1"){
			if(count == 0){
				count ++;
				jp = $("#jpId").jPlayer({
				    ready: function() {
				      $(this).jPlayer("setMedia", {
				        mp3: "${base}/jplayer/music.mp3"
				      }).jPlayer("play");
				    },
				    swfPath: "${base}/jplayer",
				    loop: false
				  });
			}else{
				jp.jPlayer("play");
			}
			
		}
	},"json");
}

playMusic();
setInterval( "playMusic()" , 30*1000);

function action_form(url) {
    $("#queryForm").attr("action", url);
    $("#queryForm").submit();
}

</script>
</head>
<body>
<div id="jpId" style="display: none;"></div>
<div class="box-positon">
	<div class="rpos"><@s.m "global.position"/>:  <@s.m "orders.function"/> - <@s.m "global.list"/></div>
	<form class="ropt">
	</form>
	<div class="clear"></div>
</div>
<div class="body-box">
<form action="v_children_list.do" method="post" style="padding-top:5px;" id="queryForm" >
<div>
学校名称: <input type="text" name="school" value="${school!}" style="width:100px"/>
班级名称: <input type="text" name="classes" value="${classes!}" style="width:100px"/>
姓名: <input type="text" name="userName" value="${userName!}" style="width:100px"/>
手机号: <input type="text" name="mobile" value="${mobile!}" style="width:100px"/>
开始时间：<input type="text" name="startTime" value="${startTime!}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
结束时间：<input type="text" name="endTime" value="${endTime!}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
星期: <@p.select name="productCateId" value="${productCateId!}" list=cateList headerKey="" listKey="id" listValue="cateName"  headerValue="请选择"/>
<!-- 周: <@p.select name="status" value="${status!}" list={"1":"待接单","-1":"已接单"}/> -->
<input type="hidden" name="pageNo" value="${pageNo!}"/>
<input class="query" type="submit" value="<@s.m "global.query"/>"/> 
<input class="query" type="button" value="导出" onclick='action_form("children_list_export.do");''/> 
</div>
</form>
<form id="tableForm" method="post">
<!-- <div >
	<input class="del-button" type="button" value="接单" onclick="optConfirm(this);"/>&nbsp;&nbsp;&nbsp;
	<input class="del-button" type="button" value="发货" onclick="optShipped(this);"/>&nbsp;&nbsp;&nbsp;
	<input class="del-button" type="button" value="送达" onclick="optConsignee(this);"/>&nbsp;&nbsp;&nbsp;
	<input class="del-button" type="button" value="退单" onclick="optDelete(this);"/>&nbsp;&nbsp;&nbsp; 
	<input class="del-button" type="button" value="打印" onclick="optPrint(this);"/>
</div> -->
<@p.table value=pagination;orders,i,has_next><#rt/>
	<!-- <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type='checkbox' name='ids' value='${orders.id!}'/><#t/>
	</@p.column><#t/> -->
	<@p.column code="下单日期">${orders.orderDate!}</@p.column><#t/>
	<@p.column code="星期">${orders.cateName!}</@p.column><#t/>
	<@p.column code="学校">${orders.school!}</@p.column><#t/>
	<@p.column code="班级">${orders.classes!}</@p.column><#t/>
	<@p.column code="姓名">${orders.userName!}</@p.column><#t/>
	<@p.column code="手机号">${(orders.mobile)!""}</@p.column><#t/>
	<@p.column code="餐品名称">${orders.productName!}</@p.column><#t/>
	<@p.column code="数量">${orders.buyCount!}</@p.column><#t/>
	<@p.column code="单价">${orders.uninPrice!}</@p.column><#t/>
	<@p.column code="合计">${orders.totalPrice!}</@p.column><#t/>
	<@p.column code="付款方式">${orders.payWay!}</@p.column><#t/>
</@p.table>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>